package cn.edu.nju.software.action.comment;

import cn.edu.nju.software.service.intf.CommentService;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class OperateCommentAction extends ActionSupport {

	private int id;
	private int code;
	private CommentService commentService;
	
	public void setId(int id) {
		this.id = id;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public void setCommentService(CommentService commentService) {
		this.commentService = commentService;
	}
	
	@Override
	public String execute() throws Exception {
		commentService.modifyCommentStatus(id, code);
		return SUCCESS;
	}

}
